﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CuteEditor6x
{
    public partial class index_jqueryui : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                //在工具栏上插入按钮
                CuteEditor.ToolControl tc = Editor1.ToolControls["insertcustombutonhere"];
                if (tc != null)
                {
                    var ico = new System.Web.UI.WebControls.Image();
                    ico.ToolTip = "Word一键粘贴";
                    ico.ImageUrl = "/WordPaster/css/paster.png";
                    ico.CssClass = "CuteEditorButton";
                    //SetMouseEvents(ico);
                    ico.Attributes["onclick"] = "WordPaster.getInstance().PasteManual()";
                    tc.Control.Controls.Add(ico);

                    var ico2 = new System.Web.UI.WebControls.Image();
                    ico2.ToolTip = "Word转图片";
                    ico2.ImageUrl = "/WordPaster/css/word1.png";
                    ico2.CssClass = "CuteEditorButton";
                    //SetMouseEvents(Image1);
                    ico2.Attributes["onclick"] = "WordPaster.getInstance().importWordToImg()";
                    tc.Control.Controls.Add(ico2);

                    var ico3 = new System.Web.UI.WebControls.Image();
                    ico3.ToolTip = "PowerPoint一键导入";
                    ico3.ImageUrl = "/WordPaster/css/ppt.png";
                    ico3.CssClass = "CuteEditorButton";
                    //SetMouseEvents(Image1);
                    ico3.Attributes["onclick"] = "WordPaster.getInstance().importPPT()";
                    tc.Control.Controls.Add(ico3);

                    var ico4 = new System.Web.UI.WebControls.Image();
                    ico4.ToolTip = "PDF一键导入";
                    ico4.ImageUrl = "/WordPaster/css/pdf.png";
                    ico4.CssClass = "CuteEditorButton";
                    //SetMouseEvents(Image1);
                    ico4.Attributes["onclick"] = "WordPaster.getInstance().ImportPDF()";
                    tc.Control.Controls.Add(ico4);

                    //netpaster
                    var ico5 = new System.Web.UI.WebControls.Image();
                    ico5.ToolTip = "自动上传远程服务器图片";
                    ico5.ImageUrl = "/WordPaster/css/ico.png";
                    ico5.CssClass = "CuteEditorButton";
                    //SetMouseEvents(Image1);
                    ico5.Attributes["onclick"] = "WordPaster.getInstance().UploadNetImg()";
                    tc.Control.Controls.Add(ico5);
                }
            }
        }
    }
}